package com.cljh.mapper;

import com.cljh.bean.Article;
import com.cljh.bean.Comment;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface CommentMapper {
//    List<Article> selectAllByCondition(@Param("begin") Integer begin, @Param("size") Integer size, @Param("article") Article article);

    /**
     * TODO
     *
     * @param comment
     * @return
     */


    int save(@Param("comment") Comment comment);

    /**
     * @param comment
     * @return
     */
    int update(@Param("comment") Comment comment);


//    int selectByCount(@Param("article") Article article);

//    int deleteByIds(@Param("ids") List<Integer> ids);

    @Delete("delete from mtmall_test.comment where id=#{id};")
    int deleteById(@Param("id") Integer id);


    Comment selectById(Integer id);



//    List<Comment> ArticleList();



    List<Comment> selectByArticleId(Integer id);
}
